import java.util.Scanner;
public class test2 {
    //键盘录入两个数字,表示一个范围,
    //统计这个范围中
    //既能被3整除,又能被5整除的数字有多少个
    public static void main(String[] args) {
       Scanner sc  = new Scanner(System.in);
        int number =  sc.nextInt();
        int number2 = sc.nextInt();

        int sum = 0;
        for(int a = number;a<=number2;a++){
            if(a % 3 == 0 && a % 5 == 0){
                sum++;
                System.out.println(a);
            }
        }
        System.out.println(sum);


    }
}
